home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_361 / xcolor-lib / demo_sources / xcolor.p < prev   
Text File  |  1992-05-06  |  970b  |  53 lines

  1. Program XColor_Library_ColourRequester_Demo;
  2.  
  3. {$path "pascal:include/";incl"XColor.lib" }
  4.  
  5. Var ScreenPointer : ^Screen;
  6.     Dummy         : ^Ptr;
  7.     Palette       : cr_ColourRequester;
  8.     Return        : Long;
  9.  
  10. Begin
  11.  
  12.   OpenLib(IntBase,'intuition.library',0);
  13.   OpenLib(XColorBase,'xcolor.library',0);
  14.  
  15.   { get pointer of first screen / Zeiger auf obersten Screen holen }
  16.  
  17.   Dummy:=Ptr((Long(IntBase))+60);
  18.   ScreenPointer:=Ptr(Dummy^)
  19.  
  20.  
  21.  
  22.   { put up structure / Struktur erstellen }
  23.  
  24.   with Palette do begin
  25.   Screen:=ScreenPointer;
  26.   TextColour:=0;
  27.   BackColour:=1;
  28.   GBorderColour:=2;
  29.   GTextColour:=0;
  30.   Flags:=FLAG_NORMAL+FLAG_RGB+FLAG_RMBTRAP;
  31.   LeftEdge:=40;
  32.   TopEdge:=20;
  33.   Font:=NIL;
  34.   DefaultEntries:=0;
  35.   JMPWindow:=NIL;
  36.   JMPMessage:=NIL;
  37.   JMPMode:=NIL;
  38.   JMPDraw:=NIL;
  39.   Mode:=0;
  40.   ScreenTitle:="Palette demo using KICKPASCAL";
  41.   DefaultWTitle:="Palette";
  42.   end;
  43.  
  44.   RETURN:=COLOURREQUESTER(^Palette);
  45.  
  46.  
  47.  
  48.   CloseLib(IntBase)
  49.   CloseLib(XColorBase)
  50.  
  51. End.
  52.  
  53.